<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('待接洽')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${reInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <input name="orgId" th:field="*{orgId}" type="hidden">
            <input name="accountCheck" th:field="*{accountCheck}" type="hidden">
            <input type="hidden" id="reception" name="reception" th:value="${@permission.getPrincipalProperty('loginName')}">
            <input type="hidden" id="receptionId" name="receptionId" th:value="${@permission.getPrincipalProperty('userId')}">
            <h4 class="form-header h4">基本信息</h4>
            <div class="row">
                <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-3 control-label">预约编号：</label>
                <div class="col-sm-8">
                    <p id="reNumber" name="reNumber" th:text="*{reNumber}" class="form-control-plaintext" ></p>
                </div>
            </div>
                </div>
                <div class="col-sm-6">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">企业名称：</label>
                <div class="col-sm-8">
                        <p id="companyName" name="companyName" th:text="*{companyName}" class="form-control-plaintext" ></p>
                </div>
            </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">预约日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">

                                    <p id="reDate" name="reDate" th:text="*{#dates.format(reDate,'yyyy-MM-dd')}" class="form-control-plaintext" ></p>
                            </div>
                        </div>
                    </div>
                </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label is-required">联系人电话：</label>
                            <div class="col-sm-8">
                                    <p id="contactsTel" name="contactsTel" th:text="*{contactsTel}" class="form-control-plaintext" ></p>
                            </div>
                        </div>
                    </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">联系人姓名：</label>
                        <div class="col-sm-8">
                                <p id="contactsName" name="contactsName" th:text="*{contactsName}" class="form-control-plaintext" ></p>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">企业地址：</label>
                        <div class="col-sm-8">
                                <p id="address" name="address" th:text="*{address}" class="form-control-plaintext" ></p>
                        </div>
                    </div>
                </div>
            </div>

            <h4 class="form-header h4">接洽信息（必填）</h4>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">接洽结果：</label>
                        <div class="col-sm-8">


                            <select name="accountState" class="form-control m-b" th:with="type=${@dict.getType('accept_type')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{accountState}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">账户性质：</label>
                        <div class="col-sm-8">
                            <div class="radio-box" th:each="dict : ${@dict.getType('account_type')}">
                                <input type="radio" th:id="${'accountType_' + dict.dictCode}" name="accountType" th:value="${dict.dictValue}" th:field="*{accountType}" required>
                                <label th:for="${'accountType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>



            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">接洽日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="acceptDate" th:value="${#dates.format(reInfo.acceptDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">备注：</label>
                        <div class="col-sm-8">
                            <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                        </div>
                    </div>
                </div>
            </div>






        </form>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>提 交</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/edit", $('#form-info-edit').serialize())

            }
        }

        $("input[name='reDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='acceptDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>